package com.ws.lv.service.impl;

import com.ws.lv.bean.Type;
import com.ws.lv.mapper.TypeMapper;
import com.ws.lv.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    TypeMapper typeMapper;

    @Override
    public List<Type> selectTypeAll() {
        return typeMapper.selectTypeAll();
    }

    @Override
    public List<Type> selectTypes(String type_name, Integer type_state, String type_order) {
        return typeMapper.selectTypes(type_name,type_state,type_order);
    }

    @Override
    public int insertType(Type type) {
        return typeMapper.insertType(type);
    }

    @Override
    public int updateTypeDisplay(int type_id) {
        return typeMapper.updateTypeDisplay(type_id);
    }

    @Override
    public int updateTypeHide(int type_id) {
        return typeMapper.updateTypeHide(type_id);
    }

    @Override
    public int deleteTypes(ArrayList<Integer> type_ids) {
        return typeMapper.deleteTypes(type_ids);
    }

    @Override
    public int updateType(Type type) {
        return typeMapper.updateType(type);
    }

    @Override
    public Type selectTypeById(int type_id) {
        return typeMapper.selectTypeById(type_id);
    }

    @Override
    public List<Type> homeSelectTypes() {
        return typeMapper.homeSelectTypes();
    }
}
